package common.mq.po;

import java.io.Serializable;
import java.util.Map;

public class Queue   implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -144940477300533398L;
	
	/**
	 * 等待区域
	 */
	private Map<String,Message> waitArea ;
	
	/**
	 * 1开启  2关闭
	 */
	private int status;
	
	/**
	 * 队列id
	 */
	private int id;
	
	/**
	 * 等待区域消息数
	 * @return 消息数
	 */
	public int getWaitMCount(){
		if(getWaitArea() == null || getWaitArea().isEmpty()){
			return 0;
		}
		return getWaitArea().size();
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}

	public void setWaitArea(Map<String,Message> waitArea) {
		this.waitArea = waitArea;
	}

	public Map<String,Message> getWaitArea() {
		return waitArea;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getStatus() {
		return status;
	}
}
